<%@ page isELIgnored ="false" pageEncoding="UTF-8" %> 
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Esferas Del Dragón </title>  
		<link rel="stylesheet" type="text/css" href="styles.css" />
	</head>

	<body>
		<%@ include file="Header.jsp" %>
		
	
		<center>
		
		<c:choose>
			<c:when test= "${sessionScope.celdas == null}">
		
				<form method="post" action="create" name="create">
					<input type="text" name="coordX" value="${param.coordX}" />
					<input type="text" name="coordY" value="${param.coordY}" />
					<input type="submit" value="Crear"/>
				</form>
			</c:when>
		
		
		<c:otherwise>
			<h3>Tablero:</h3>
				<table>		
					<c:forEach items="${sessionScope.celdas}" var= "colum">
						<tr>
							<c:forEach items="${colum}" var="fila" varStatus="status">
				    		<td><img src="imagenesDB/${fila.nombre}.jpg" height="75"/></td>
				    		</c:forEach>
					    </tr>
					</c:forEach>
				</table>
			<div>
			<form method="post" action="CrearPersonaje.jsp?lista=${sessionScope.tablero}" style="padding-top: 25px;">
				<input type="submit" value="CrearPersonaje"/>
			</form></br>
			<form method="post" action="CrearEsfera.jsp?flagError=false">
				<input type="submit" value="CrearEsfera"/>
			</form>
			</div>	
		</c:otherwise>
		
		</c:choose>
		</center>
		
		<%@ include file="Footer.jsp" %>
		
	</body>
</html>
